package com.gxa.mapper;

import com.gxa.pojo.Department;

import java.util.List;
import java.util.Map;

public interface DepartmentMapper {
    //分页接口
    List<Department> findAllDepartmentByPage(Integer page,Integer limit);

    //查询信息的总数
    Integer findAllDepartment();

    List<Department> findAll();

    Integer deleteDepartmentById(Integer id);

    int insert(Department record);

    /**
     * 添加部门
     * @param map
     * @return
     */
    int insertDepartment(Map map);

    Department selectByPrimaryKey(Integer departmentid);

    /**
     * 根据id修改部门
     * @param
     * @return
     */
    Integer updateDepartmentById(Map map);

    Integer departmentState(Map map);

    String findDepartmentByName(String name);
}